import { createStore, applyMiddleware, combineReducers } from 'redux'
// import logger from 'redux-logger'
import thunk from 'redux-thunk'
import count from './reducer/count'
import list from './reducer/list'

// let reducer = (state = initState, action) => {
//     return {
//         count: count(state.count, action),
//         list: list(state.list, action)
//     }
// }

let reducer = combineReducers({
    count,
    list
})

// let initState = {
//     count: 100,
//     list: []
// }

let store = createStore(reducer, applyMiddleware(thunk))

window.store = store

export default store